#version 330
in highp vec3 f_vertex;
in highp vec3 f_color;
in highp vec3 f_normal;
out highp vec4 fragColor;
uniform highp vec3 lightPos;
void main(){
	highp vec3 light = normalize(lightPos - f_vertex);
	highp float light_result = max(dot(normalize(f_normal), light), 0.f);
	highp vec3 color_result = clamp(f_color * 0.2 + f_color * 0.8 * light_result, 0.f, 1.f);
	fragColor = vec4(color_result, 1.f);
}